package com.tougutips.cookbook.mapper;

import com.tougutips.cookbook.entity.Cookbook;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

/**
 * @author YSY
 * @Description 食谱的数据层（ES搜索用）
 * @DateTime 2022/7/21 20:01
 * @Email 296242766@qq.com
 */
@Mapper
public interface CookbookMapperES extends ElasticsearchRepository<Cookbook,Long> {
    /**
     * 用ES根据名称模糊查询
     * @param name 关键词
     * @return 列表
     */
    List<Cookbook> findCookbooksByCookbookNameLike(String name);
}
